import 'package:flutter/material.dart';
import 'package:hello_flutter/base/index.dart';

class PaddingWidget extends BasePage {
  const PaddingWidget({super.key});

  @override
  String getPageTitle() => 'Padding';

  @override
  Widget buildBody(BuildContext context) {
    return Container(
      color: Colors.blue.shade300,
      child: Padding(
        padding: const EdgeInsets.all(16),
        child: Container(
          color: Colors.green.shade300,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Padding(
                padding: const EdgeInsets.only(left: 8),
                child: Container(
                  color: Colors.red.shade300,
                  child: const Text('Hello world'),
                ),
              ),
              Padding(
                padding: const EdgeInsets.symmetric(vertical: 8),
                child: Container(
                  color: Colors.purple.shade300,
                  child: const Text('I am Jack'),
                ),
              ),
              Padding(
                padding: const EdgeInsets.fromLTRB(20, 0, 20, 20),
                child: Container(
                  color: Colors.pink.shade300,
                  child: const Text('Your friend'),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
